/*
 * @Author: xiweidong 1324156920@qq.com
 * @Date: 2025-08-26 11:16:38
 * @LastEditors: xiweidong 1324156920@qq.com
 * @LastEditTime: 2025-08-26 11:30:16
 * @FilePath: \web\src\api\system.ts
 * @Description: 服务监控接口
 */
import request from "../../utils/request";
import type {
  GetCpuInfoRes,
  GetJvmInfoRes,
  GetMemInfoRes,
  GetSysFileInfoRes,
  GetSysInfoRes,
  GetAllInfoRes,
} from "./types";

/**
 * getSystemInfo
 * @returns
 */
export function getSystemInfo(): Promise<GetAllInfoRes> {
  return request.get(`/monitor/all-info`);
}

/**
 * getCpuInfo
 * @returns
 */
export function getCpuInfo(): Promise<GetCpuInfoRes> {
  return request.get(`/monitor/cpu-info`);
}

/**
 * getJvmInfo
 * @returns
 */
export function getJvmInfo(): Promise<GetJvmInfoRes> {
  return request.get(`/monitor/jvm-info`);
}

/**
 * getMemInfo
 * @returns
 */
export function getMemInfo(): Promise<GetMemInfoRes> {
  return request.get(`/monitor/mem-info`);
}

/**
 * getSysFileInfo
 * @returns
 */
export function getSysFileInfo(): Promise<GetSysFileInfoRes[]> {
  return request.get(`/monitor/sys-file-info`);
}
/**
 * getSysInfo
 * @returns
 */
export function getSysInfo(): Promise<GetSysInfoRes> {
  return request.get(`/monitor/sys-info`);
}
